    <style type="text/css">
        #post_photo_modal {
            width: 1000px;
            height: 600px;
            margin-left: -500px;
            margin-top: -45px;
        }
        #post_photo_modal .modal-body {
            max-height: 470px;
            min-height: 440px;
        }
        #post_photo_modal .post_photo_title {
            min-height: 40px;
        }
        #post_photo_carousel {
            margin-bottom: 0;
        }
        #post_photo_carousel .carousel-indicators {
            cursor: pointer;
        }
        #post_photo_carousel .carousel-inner {
            min-height: 440px;
        }
        #post_photo_carousel .carousel-inner .item {
            background-image: url("assets/img/bg-shadow.png");
        }
        #post_photo_carousel .carousel-inner .item img {
            height: 440px;
            margin: 0 auto;
        }
        #post_photo_carousel .carousel-caption {
            text-align: center;
        }
    </style>
    <div class="modal hide fade" id="post_photo_modal">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">x</button>
            <h2 class="post_photo_title"></h2>
        </div>
        <div class="modal-body">
            <div id="post_photo_carousel" class="carousel slide">
                <ol class="carousel-indicators">
                </ol>
                <div class="carousel-inner">
                </div>
                <a class="carousel-control left" href="#post_photo_carousel" data-slide="prev">&lsaquo;</a>
                <a class="carousel-control right" href="#post_photo_carousel" data-slide="next">&rsaquo;</a>
            </div>
        </div>
        <div class="modal-footer">
            <div class="btn-group">
                <a class="btn" id="post_photo_cancel">关闭</a>
            </div>
        </div>
        </form>
    </div>
    <script type="text/javascript">
        $(function() {
            $('#post_photo_cancel').click(function() {
                $('#post_photo_modal').modal('hide');
            });
        });
        function gen_carousel_indicator(count) {
            var html = '';
            for (i = 0; i < count; i++) {
                html += '<li data-target="#post_photo_carousel" data-slide-to="' + i + '"';
                if (i == 0) {
                    html += 'class="active"></li>';
                } else {
                    html += '></li>';
                }
            }
            return html;
        }
        function get_carousel(post_id, post_title) {
            $.post('post/post_photo_carousel', {
                post_id: post_id
            }, function(carousel) {
                $.get('assets/templates/post_photo_carousel.html', function(html) {
                    var carousel_html = '';
                    for (id in carousel) {
                        var view = {
                            photo_id: carousel[id].photo_id,
                            location: carousel[id].location,
                            photo_title: (carousel[id].photo_title == carousel[id].origin_name) ? '' : carousel[id].photo_title
                        };
                        carousel_html += Mustache.render(html, view);
                    }
                    $('#post_photo_carousel .carousel-inner').empty().html(carousel_html);
                    $('#post_photo_carousel .carousel-inner .item:first-child').addClass('active');
                    $('#post_photo_modal .post_photo_title').text(post_title);
                    $('#post_photo_carousel .carousel-caption h4').each(function() {
                        var $me = $(this);
                        if ($me.text() == '') {
                            $me.parent().remove();
                        }
                    });
                    $('#post_photo_carousel').hideLoading();
                });
                var indicator = gen_carousel_indicator(carousel.length);
                $('#post_photo_carousel .carousel-indicators').empty().html(indicator);
            }, 'json');
        }
        function post_photo_carousel(post_id, post_title) {
            get_carousel(post_id, post_title);
            $('#post_photo_modal').modal('show');
            $('#post_photo_carousel').showLoading().carousel({
                interval: false
            });
        }
    </script>
    <script src="assets/js/mustache.js"></script>    